<include file="../header" />
<div id="left-sider"><include file="../left-sider" /></div>
<style type="text/css">
textarea {width:100%;}
#content {height: 500px;}
#summary {height: 200px;}
#submit {height: 3em; width: 6em;}
#title {width: 99%; padding: .3em .5%; font-size: 1.2em;}
</style>
<div id="main">
  <div class="main-hd">
    <h2>Edit the Blog</h2>
  </div>
  <div class="main-bd">
  <form action="{:U('Blog/do_edit')}" method="post" target="_self"  class="new-form">
    <p><input type="text" name="title" id="title" required placeholder="标题" value="{$blog.title}"/></p>
    <p><textarea name="content" id="content">{$blog.content}</textarea></p>
    <table width="100%" border="0">
        <tr>
            <td>
                <label for="createtime">日期:</label>
                <input type="date" name="createtime" id="createtime" placeholder="{:date('Y-m-d')}" required="required" value="{$blog.createtime|date='Y-m-d',###}"/>
            </td>
            <td>
                <label for="sort">排序:</label>
                <input type="number" name="sort" value="{$blog.sort}"/>
            </td>
            <td><label for="lang">语言:</label>
                <select name="lang" id="lang">
                  <option value="zh-cn" <if condition="$blog.lang eq 'zh-cn'">selected="selected"</if> >简体中文</option>
                  <option value="en-us" <if condition="$blog.lang eq 'en-us'">selected="selected"</if> >English</option>
                </select>
            </td>
        </tr>
    </table>
    <p class="text-center">
      <input id="submit" type="submit" value="更新" />
      <input type="hidden" name="id" value="{$blog.id}"/>
    </p>
  </form>
</div>
<include file="../footer" />

<import type="js" file="js.jquery"/>
<import type="js" file="js.xheditor"/>
<script type="text/javascript">
$('#content').xheditor({tools:'full'});
</script>